home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 090 / cutpaste.lbr / PASTE.DQC / PASTE.DOC
Encoding:
Text File  |  1985-06-03  |  7.4 KB  |  199 lines

  1.  
  2.  
  3.  
  4.      CCCCUUUUTTTT((((1111))))                      UUUUNNNNIIIIXXXX 4444....0000                       CCCCUUUUTTTT((((1111))))
  5.  
  6.  
  7.  
  8.      NNNNAAAAMMMMEEEE
  9.           paste - merge same lines of several files or subsequent
  10.           lines of one file
  11.  
  12.      SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  13.           ppppaaaasssstttteeee ffffiiiilllleeee1111 ffffiiiilllleeee2222 ............
  14.           ppppaaaasssstttteeee ----ddddlllliiiisssstttt ffffiiiilllleeee1111 ffffiiiilllleeee2222 ............
  15.           ppppaaaasssstttteeee ----ssss [[[[----dddd]]]]lllliiiisssstttt ffffiiiilllleeee1111 ffffiiiilllleeee2222 ............
  16.  
  17.      DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  18.           In the first two forms, _p_a_s_t_e concatenates corresponding
  19.           lines of the given input files _f_i_l_e_1, _f_i_l_e_2, etc.  It treats
  20.           each file as a column or columns of a table and pastes them
  21.           together horizontally (parallel merging).  If you will, it
  22.           is the counterpart of _c_a_t(1) which concatenates vertically,
  23.           i.e., one file after the other. In the last form above,
  24.           _p_a_s_t_e replaces the function of an older command with the
  25.           same name by combining subsequent lines of the input file
  26.           (serial merging).  In all cases, lines are glued together
  27.           with the _t_a_b character, or with characters from an
  28.           optionally specified _l_i_s_t.  Output is to the standard
  29.           output, so it can be used as the start of a pipe, or as a
  30.           filter, if ---- is used in place of a file name.
  31.  
  32.           The meanings of the options are:
  33.  
  34.           ----dddd
  35.            Without this option, the new-line characters of each but
  36.            the last file (or last line in case of the ----ssss option) are
  37.            replaced by a _t_a_b character.  This option allows replacing
  38.            the _t_a_b character by one or more alternate characters (see
  39.            below).
  40.  
  41.           _l_i_s_t
  42.            One or more characters immediately following ----dddd replace the
  43.            default _t_a_b as the line concatenation character.  The list
  44.            is used circularly, i.e., when exhausted, it is reused.  In
  45.            parallel merging (i.e., no ----ssss option) the lines from the
  46.            last file are always terminated with a new-line character,
  47.            not from the _l_i_s_t.  The list may contain the special escape
  48.            sequences: \\\\nnnn (new-line), \\\\tttt (tab), \\\\\\\\ (backslash), and \\\\0000
  49.            (empty string, not a null character.)  Quoting may be
  50.            necessary, if characters have special meaning to the shell
  51.            (e.g., to get one backslash, use -_d"\\\\").  SPECIAL NOTE:
  52.            This version of _p_a_s_t_e has had the list of special
  53.            characters expanded from the Unix(Tm) standard to include
  54.            the following additional characters: \\\\bbbb (backspace), \\\\ffff
  55.            (form-feed), \\\\rrrr (carriage return), \\\\vvvv (vertical tab).
  56.  
  57.           ----ssss
  58.            Merge subsequent lines rather than one from each input
  59.            file.  Use _t_a_b for concatenation, unless a _l_i_s_t is
  60.  
  61.  
  62.  
  63.      Page 1                                          (printed 8/19/84)
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.      CCCCUUUUTTTT((((1111))))                      UUUUNNNNIIIIXXXX 4444....0000                       CCCCUUUUTTTT((((1111))))
  71.  
  72.  
  73.  
  74.            specified with ----dddd option.  Regardless of the _l_i_s_t, the very
  75.            last character of the file is forced to be a new-line.
  76.  
  77.           ----
  78.            May be used in place of any file name, to read a line from
  79.            the standard input. (There is no prompting).
  80.  
  81.      EEEEXXXXAAAAMMMMPPPPLLLLEEEESSSS
  82.           ls | paste -d
  83.             list directory in one column
  84.  
  85.           ls | paste - - - -
  86.             list directory in four columns
  87.  
  88.      SSSSEEEEEEEE AAAALLLLSSSSOOOO
  89.           grep(1),paste(1).
  90.  
  91.      DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
  92.           _n_o _d_e_l_i_m_i_t_e_r_s
  93.             Missing _l_i_s_t for ----dddd option
  94.  
  95.           <_f_i_l_e_n_a_m_e> : _c_a_n_n_o_t _o_p_e_n
  96.             _p_a_s_t_e was given a bad filename
  97.  
  98.           _t_o_o _m_a_n_y _f_i_l_e_s
  99.             Except for ----ssss option, no more than 12 input files may be
  100.             specified.
  101.  
  102.      CCCCAAAAVVVVEEEEAAAATTTTSSSS
  103.           This program is a complete rewrite of the Bell Laboratories
  104.           command of the same name; no part of the original source or
  105.           manual is included.  Therefore, you may feel free to use it,
  106.           and its source, without violation of any contract
  107.           agreements.  However, I retain the copyright in order to
  108.           specify it remain available for use by all and sundry,
  109.           without cost.  Feel free to modify as necessary, although I
  110.           went to great pains to recreate the behavior of the original
  111.           command; I would suggest this congruence be maintained.
  112.  
  113.           Along the same lines, although I've made a reasonable effort
  114.           to test the more arcane behavior of the original _p_a_s_t_e and
  115.           reproduce it, there are no guarantees; and there _a_r_e four
  116.           known differences between the original program and
  117.           documentation, and this version.  All are downward
  118.           compatible.  First, _p_a_s_t_e as distributed with Unix has a bug
  119.           in the way it handles multiple files for the ----ssss option.
  120.           This has been fixed, and the bug reported to the providers
  121.           of the Unix command.  Secondly, the list of valid escape
  122.           characters for the _l_i_s_t has been expanded.  Third, the 511
  123.           character/line restriction has been removed.  Finally,
  124.           extant undocumented diagnostics have been added to the man
  125.           page, and the one pertaining to the (now obsolete) _l_i_n_e _t_o_o
  126.  
  127.  
  128.  
  129.      Page 2                                          (printed 8/19/84)
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.      CCCCUUUUTTTT((((1111))))                      UUUUNNNNIIIIXXXX 4444....0000                       CCCCUUUUTTTT((((1111))))
  137.  
  138.  
  139.  
  140.           _l_o_n_g removed.
  141.  
  142.           I remain in no way liable for any loss, either explicit or
  143.           incidental, that may be incurred through use of this
  144.           command.  I do ask that any bugs (and, hopefully, fixes) be
  145.           reported back to me as encountered. - David M. Ihnat,
  146.           ihuxx!ignatz
  147.  
  148.  
  149.  
  150.  
  151.  
  152.  
  153.  
  154.  
  155.  
  156.  
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.      Page 3                                          (printed 8/19/84)
  196.  
  197.  
  198.  
  199.